/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: wx
 * Date: 2023-11-30
 * Time: 19:11
 */
public class Testdemo27 {
    static class SingLentonlazy {
        private static  SingLentonlazy instance = null;

        public static SingLentonlazy getInstance() {
            if(instance == null) {
                instance = new SingLentonlazy();
            }
            return instance;
        }


        private SingLentonlazy() {
        }
    }



    public static void main(String[] args) {
        SingLentonlazy S1 = SingLentonlazy.getInstance();
        SingLentonlazy S2 = SingLentonlazy.getInstance();
        System.out.println(S1==S2);
    }
}





















